<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Auth
 * @subpackage Adapter
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Digest.php 23775 2011-03-01 17:25:24Z ralph $
 */


/**
 * @see Zend_Auth_Adapter_Interface
 */
require_once 'Ext/User/Action/Gain/Interface.php';

/**
 * @category   Zend
 * @package    Zend_Auth
 * @subpackage Adapter
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
abstract class Ext_User_Action_Gain_Abstract implements Ext_User_Action_Gain_Interface
{
    protected $_userId;
    
    protected $_result;

    /**
     * Sets adapter options
     *
     * @param  mixed $username
     * @param  mixed $password
     * @return void
     */
    public function __construct($userId)
    {
        $this->_userId = $userId;
    }
    
    /**
     * Returns the username option value or null if it has not yet been set
     *
     * @return string|null
     */
    public function getUserId()
    {
        return $this->_userId;
    }

    /**
     * Sets the username option value
     *
     * @param  mixed $username
     * @return Zend_Auth_Adapter_Digest Provides a fluent interface
     */
    public function setUserId($userId)
    {
        $this->_userId = (string) $userId;
        return $this;
    }
    
    public function setResult($code, $data = null)
    {
        $result = array(
            'code'         => Ext_User_Action_Gain_Result::FAILURE,
            'data'         => "",
        );
	
        if($code == Ext_User_Action_Gain_Result::SUCCESS){
        } else {
		}
			
		$result['data']       = $data;
		
        $this->_result = new Ext_User_Action_Gain_Result($code, $result['data']);

    }
    
    public function getResult()
    {
        return $this->_result;
    }
}
